﻿namespace ChessToys
{
    /// <summary>
    /// Abstract class building a pair.
    /// </summary>
    /// <typeparam name="TFirst">The type parameter for the first pair member.</typeparam>
    /// <typeparam name="TSecond">The type parameter for the second pair member.</typeparam>
    public abstract class AbstractPair<TFirst, TSecond>
    {
        private TFirst _first;
        private TSecond _second;

        /// <summary>
        /// Initializes a new instance of the <see cref="AbstractPair&lt;TFirst, TSecond&gt;"/> class.
        /// </summary>
        /// <param name="first">The first pair member.</param>
        /// <param name="second">The second pair member.</param>
        protected AbstractPair(TFirst first, TSecond second)
        {
            _first = first;
            _second = second;
        }

        /// <summary>
        /// Gets the first pair member.
        /// </summary>
        /// <value>The first pair member.</value>
        protected TFirst First
        {
            get { return _first; }
        }

        /// <summary>
        /// Gets the second pair member.
        /// </summary>
        /// <value>The second pair member.</value>
        protected TSecond Second
        {
            get { return _second; }
        }
    }
}
